package com.zxq.jt808.frame.frame;

import com.zxq.factory.annotate.DecoderField;
import com.zxq.factory.annotate.EncoderField;
import com.zxq.factory.annotate.Frame;
import com.zxq.factory.enums.EField;

@Frame
public class MessageHead {

    @EncoderField
    @DecoderField
    Integer messageId;

    @EncoderField(sequence = 1)
    @DecoderField(sequence = 1)
    Integer messageAttribute;

    @EncoderField(sequence = 2,field = EField.Long)
    @DecoderField(sequence = 2,field = EField.Long)
    Long terminalPhone;

    @EncoderField(sequence = 3)
    @DecoderField(sequence = 3,field = EField.Long)
    Integer messageSerial;

    @EncoderField(sequence = 4,field = EField.Frame)
    @DecoderField(sequence = 4,field = EField.Frame)
    @Frame
    PacketDescribe packetDescribe;

    @Frame
    public static class PacketDescribe {

        @EncoderField
        @DecoderField
        Integer total;

        @EncoderField(sequence = 1)
        @DecoderField(sequence = 1)
        Integer index;

    }


}
